unit open_rating_unit;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics,
  Controls, Forms, Dialogs, ImgList, StdCtrls, DBCtrls, data_module,
  cxGraphics, cxControls, cxLookAndFeels, cxLookAndFeelPainters, cxContainer,
  cxEdit, dxSkinsCore, dxSkinBlack, dxSkinBlue, dxSkinBlueprint, dxSkinCaramel,
  dxSkinCoffee, dxSkinDarkRoom, dxSkinDarkSide, dxSkinDevExpressDarkStyle,
  dxSkinDevExpressStyle, dxSkinFoggy, dxSkinGlassOceans, dxSkinHighContrast,
  dxSkiniMaginary, dxSkinLilian, dxSkinLiquidSky, dxSkinLondonLiquidSky,
  dxSkinMcSkin, dxSkinMoneyTwins, dxSkinOffice2007Black, dxSkinOffice2007Blue,
  dxSkinOffice2007Green, dxSkinOffice2007Pink, dxSkinOffice2007Silver,
  dxSkinOffice2010Black, dxSkinOffice2010Blue, dxSkinOffice2010Silver,
  dxSkinPumpkin, dxSkinSeven, dxSkinSevenClassic, dxSkinSharp, dxSkinSharpPlus,
  dxSkinSilver, dxSkinSpringTime, dxSkinStardust, dxSkinSummer2008,
  dxSkinTheAsphaltWorld, dxSkinsDefaultPainters, dxSkinValentine, dxSkinVS2010,
  dxSkinWhiteprint, dxSkinXmas2008Blue, cxTextEdit, cxMaskEdit, cxDropDownEdit,
  cxLookupEdit, cxDBLookupEdit, cxDBLookupComboBox;

type
  Topen_rating_form = class(TForm)
    Label1: TLabel;
    ok_button: TButton;
    cancek_button: TButton;
    ImageList1: TImageList;
    discipline_combo: TcxLookupComboBox;
    study_plan_combo: TcxLookupComboBox;
    Label2: TLabel;
    school_combo: TcxLookupComboBox;
    Label3: TLabel;
    profile_combo: TcxLookupComboBox;
    Label4: TLabel;
    procedure cxLookupComboBox1PropertiesChange(Sender: TObject);
    procedure school_comboPropertiesChange(Sender: TObject);
    procedure profile_comboPropertiesChange(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  open_rating_form: Topen_rating_form;

implementation

{$R *.dfm}

procedure Topen_rating_form.cxLookupComboBox1PropertiesChange(Sender: TObject);
begin
  with data_mod.schools_query do
  begin
    ParamByName('id_study_type').Value:=study_plan_combo.EditValue;
    ExecSQL;
  end;
end;

procedure Topen_rating_form.profile_comboPropertiesChange(Sender: TObject);
begin
  with data_mod.discipline_for_open_rating_query do
  begin
    ParamByName('id_profile').Value:=profile_combo.EditValue;
    ExecSQL;
  end;
end;

procedure Topen_rating_form.school_comboPropertiesChange(Sender: TObject);
begin
  with data_mod.profiles_query do
  begin
    ParamByName('id_school').Value:=school_combo.EditValue;
    ExecSQL;
  end;
end;

end.
